#!/bin/sh

. /etc/rc.subr

name=buildbotweb
rcvar=`set_rcvar`
#bbweb_enable=${bbweb_enable:-"YES"}
buildbotweb_enable="YES"
command=/usr/local/bin/${name}
pidfile=/var/run/${name}.pid
#command_args="runserver 0.0.0.0:80 > /dev/null 2>&1"
stop_cmd="buildbotweb_stop"

command_args=" > /dev/null 2>&1 &"

buildbotweb_stop(){
    echo "Killing pids:"
    pgrep -lf /usr/local/bin/buildbotweb /usr/local/bin/bbmanage
    pkill -f /usr/local/bin/buildbotweb /usr/local/bin/bbmanage
    echo "Done"
}


run_rc_command "$1" 

